package com.soft.collateral.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author yzh
 * @desc TODO
 * @date 2025/7/25
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("押品类")
@TableName("collateral")
public class Collateral {

    @TableId(value = "collateral_id",type = IdType.AUTO)
    @ApiModelProperty("押品唯一ID")
    private Integer collateralId;

    @TableField("type_id")
    @ApiModelProperty("押品类型ID")
    private Integer typeId;

    @TableField("collateral_name")
    @ApiModelProperty("押品名称")
    private String collateralName;


    @TableField("quantity")
    @ApiModelProperty("押品数量")
    private Integer quantity;

    @TableField("status")
    @ApiModelProperty("押品当前状态")
    private Integer status;

    @TableField("current_value")
    @ApiModelProperty("押品当前估值")
    private Double currentValue;

    @TableField("pic")
    @ApiModelProperty("押品主图URL")
    private String pic;

    @TableField("created_by")
    @ApiModelProperty("押品创建人")
    private String createdBy;

    @TableField(value = "created_at",fill = FieldFill.INSERT)
    @ApiModelProperty("押品创建时间")
    private LocalDateTime createdAt;

    @TableField("updated_by")
    @ApiModelProperty("押品更新人")
    private String updatedBy;

    @TableField(value = "updated_at",fill = FieldFill.UPDATE)
    @ApiModelProperty("押品更新时间")
    private LocalDateTime updatedAt;

    @TableField(exist = false)
    @ApiModelProperty("关联的押品类型信息")
    private CollateralType collateralType;

    @TableField(exist = false)
    @ApiModelProperty("关联的押品详细信息")
    private CollateralDetail collateralDetail;

    @TableField(exist = false)
    @ApiModelProperty("关联的押品图片列表")
    private List<CollateralPic> collateralPic;

    @TableField(exist = false)
    @ApiModelProperty("关联的押品凭证信息")
    private Document document;
}